﻿@model IPagedList<HelpQuestion>
<div class="page">
    <div class="pageHeader">
        <form id="pagerForm" onsubmit="return navTabSearch(this);" action="/Help" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>
                        标题关键字：</label>
                    <input name="Title" type="text" maxlength="20" value="@ViewBag.Title" />
                </li>
                <li>
                    <label>
                        分 类：
                    </label>
                    <select name="Category">
                        <option>请选择</option>
                        @foreach (var o in HelpQuestion.CategoryDictionary)
                        {
                            <option value="@(o.Key)" @(ViewBag.Category == o.Key ? "selected=selected" : string.Empty)>@o.Value</option>
                        }
                    </select>
                </li>
                <li>
                    <label>
                        首 显：
                    </label>
                    <select name="ShowOnMenu">
                        <option>请选择</option>
                        @if (ViewBag.ShowOnMenu != null)
                        {
                            <option value="False" @(!ViewBag.ShowOnMenu ? "selected=selected" : string.Empty)>否</option>
                            <option value="True" @(ViewBag.ShowOnMenu ? "selected=selected" : string.Empty)>是</option>
                        }
                        else
                        {
                            <option value="False">否</option>
                            <option value="True">是</option>
                        }
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        </form>
    </div>
    <div class="PageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li><a class="edit" href="/Help/Question" target="dialog" mask="true" title="添加"
                    width="830" height="550" onclick="javascript:void(0);"><span>添 加</span></a></li>
                <li><a class="edit" href="/Help/Question/{param}" target="dialog" title="编辑" mask="true"
                    width="830" height="550" onclick="javascript:void(0);"><span>编 辑</span></a></li>
                <li><a class="delete" href="/Help/Delete/{param}" target="ajaxTodo" title="确定要删除吗?">
                    <span>删 除</span></a></li>
            </ul>
        </div>
        <table class="table" layouth="138" width="100%">
            <thead>
                <tr>
                    <th width="40" align="center">
                        Id
                    </th>
                    <th width="100">
                        用户名
                    </th>
                    <th>
                        昵 称
                    </th>
                    <th width="60">
                        上次登录IP
                    </th>
                    <th width="100">
                        上次登录时间
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var o in Model)
                {
                    <tr target="param" rel="@o.Id">
                        <td>@o.Id
                        </td>
                        <td>@(HelpQuestion.CategoryDictionary.FirstOrDefault(x => x.Key == o.Category).Value)
                        </td>
                        <td>@o.Title
                        </td>
                        <td>@o.DisplayOrder
                        </td>
                        <td>@o.ShowOnMenu.ToText("是", "否")
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
